package Content;
import java.util.ArrayList;
import java.util.List;

/**
 * TCSS 360 - Winter 2014
 * TESK Software
 */

/**
 * Represents a sub program chair object. 
 * 
 * @author Emily Linniman
 * @version March 3, 2014
 *
 */
public class SubProgramChair extends User {
	
	/** A string representing the sub program chair. */
	private static final String SUBCHAIR = "SubProgram Chair";
	
	/** A list of papers the sub program chair is in charge of. */
	private List<Paper> paperList;
	
	/**
	 * Constructs a sub program chair object.
	 * 
	 * @param the_name the name of the sub program chair
	 * @param the_password the password of the sub program chair
	 * @param the_role the role of the user
	 */
	public SubProgramChair(String the_name, String the_password, String the_role) {
		super(the_name, the_password, SUBCHAIR);
		paperList = new ArrayList<Paper>();
	}

	/** 
	 * Adds a paper to the sub program chair's list.
	 * @param the_paper the paper to be added to the list
	 */
	public void addPaper(Paper the_paper) {
		paperList.add(the_paper);
	}
	
	/**
	 * Assigns a reviewer to a paper.
	 * @param the_reviewer the reviewer to assign the paper to
	 * @param the_paper the paper to assign the reviewer to
	 */
	public void assign(Reviewer the_reviewer, Paper the_paper) {
		the_reviewer.addPaper(the_paper);
	}
}
